using System;
using System.Text ;
using System.Data ;
using System.Collections ;
using WP.MF.DataAccess; 
using WP.DB;
using WP.Commons;

namespace WP.MF.BusinessLogical
{
    public class MDftPostPrintStatusBLL
    {
        MDftPostPrintStatusDAL mDftPostPrintStatusDAL = new MDftPostPrintStatusDAL();
        public MDftPostPrintStatusBLL() { }

        public bool Update(DataRow dr)
        {
            DBAccess dBAccess = new DBAccess(false,true);
            try
            {
                mDftPostPrintStatusDAL.Update(dBAccess, dr);
                dBAccess.CommitTranAndCloseCon();
            }
            catch (Exception e)
            {
                dBAccess.RollbackTranAndClose();
                ExceptionManager.ProcessException(e);
                return false;
            }
            return true;
        }

        public bool UpdateTable( DataView dv)
        {
            DBAccess dBAccess = new DBAccess(false, true);
            try
            {
                mDftPostPrintStatusDAL.UpdateTable(dBAccess, dv);
                dBAccess.CommitTranAndCloseCon();
            }
            catch (Exception e)
            {
                dBAccess.RollbackTranAndClose();
                ExceptionManager.ProcessException(e);
                return false;
            }
            return true;
        }
    }
}
